import { Context } from 'koa'
import koaRouter from 'koa-router'
import IndexController from '../controller/IndexController'
//import { anythingLogger } from '../logger'
import AccessLogMiddlewate from '../middleware/AccessLogMiddleware'
//导入阿里视频点播模块
import Client from '../controller/VodController'

const router = new koaRouter()

router.get(
  '/',
  (ctx: Context) => {
    // console.log(ctx.method);
    // anythingLogger.info('哈哈')
    ctx.body = '11'
    // return next()
  },
  AccessLogMiddlewate,
  IndexController.test
)

router.get('/test', IndexController.test)
router.post('/testValidate', IndexController.testValidate)
//router.post('/testVod', Client.vod)
//获取视频上传凭证
// router.post('/getUploadAuth', Client.getUploadAuth)
// //刷新视频上传凭证
// router.post('/refreshUploadAuth', Client.refreshUploadAuth)
// //获取视频上传详情
// router.post('/getUploadDetails', Client.getUploadDetails)
// //获取播放地址
// router.post('/getPlayAddress', Client.getPlayAddres)
// //获取播放凭证
// router.post('/getPlayAuth', Client.getPlayAuth)
export default router
